package cn.sq.musicserver.plug.model.neteasecloudmusic.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: SQ
 * Date: 2020/12/10
 * Time: 15:44
 * Description: 登录返回结果
 * Interface：/login
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "登录返回结果", description = "登录返回结果")
public class LoginResult {

    /**
     * loginType : 0
     * code : 200
     * account : {"id":18769859,"userName":"1_15619608424","type":1,"status":0,"whitelistAuthority":0,"createTime":0,"salt":"[B@1f91e345","tokenVersion":3,"ban":0,"baoyueVersion":0,"donateVersion":0,"vipType":0,"viptypeVersion":0,"anonimousUser":false}
     * token : fbf5b89fdf32e70f1d4290bd884a2fb3dcc4f1315f3ca117824516614ac4033bd106471d18c1d4a4
     * profile : {"avatarImgId":3329321209025958,"birthday":-2209017600000,"nickname":"旅途的人生","djStatus":0,"experts":{},"followed":false,"backgroundUrl":"https://p2.music.126.net/CBnGs1GL-_zQIeCdMiod4g==/109951163002633594.jpg","detailDescription":"","mutual":false,"remarkName":null,"expertTags":null,"authStatus":0,"description":"","avatarImgIdStr":"3329321209025958","city":610500,"backgroundImgIdStr":"109951163002633594","backgroundImgId":109951163002633600,"avatarUrl":"https://p4.music.126.net/gDLPJmke4wS6l42XAhBskQ==/3329321209025958.jpg","userId":18769859,"userType":0,"defaultAvatar":false,"province":610000,"accountStatus":0,"vipType":0,"gender":0,"signature":"","authority":0,"followeds":5,"follows":17,"eventCount":0,"avatarDetail":null,"playlistCount":21,"playlistBeSubscribedCount":0}
     * bindings : [{"bindingTime":1513513621053,"refreshTime":1513513765,"tokenJsonStr":"{\"countrycode\":\"\",\"cellphone\":\"15619608424\",\"hasPassword\":true}","expired":false,"userId":18769859,"url":"","expiresIn":2147483647,"id":6506467840,"type":1},{"bindingTime":1513513800990,"refreshTime":1513513800,"tokenJsonStr":"{\"access_token\":\"68FCFED4EEC5D005CCF3E1DA751DAED2\",\"openid\":\"86F6093C4DC0149BDD2BA5C8BBB46699\",\"nickname\":\"喵帕斯\",\"partnerType\":\"0\",\"expires_in\":7775999}","expired":true,"userId":18769859,"url":"","expiresIn":7775999,"id":6506460898,"type":5},{"bindingTime":1513513792369,"refreshTime":1513513792,"tokenJsonStr":"{\"access_token\":\"4_LV0xljflZTAPyvCUpJDOo_QucoMoOFMmj3dn7xgGDqM8AbXoeY8XunaPvbO3RzG9HTuAYLkOVjJCyVGPMCJcG0pUp1GlNJd0i05wp_j9xhs\",\"refresh_token\":\"4_hYHWIX6A6dNURO4cim2U2H_4tLJFbyIO_dWC2wRnIF1zxO70om6GOL2MIkeKCKNctBhJtzcrVmcy1EZJouIyIMkW3NZC_rdhbYH6XUrKi24\",\"unionid\":\"oZoefuNUppNE6lZaLUpHoN6dWKFk\",\"openid\":\"okvmMjrsKqNCyW7liOrl1nh_qqcw\",\"scope\":\"snsapi_userinfo\",\"name\":\"喵帕斯\",\"nickname\":\"喵帕斯\",\"expires_in\":7200}","expired":true,"userId":18769859,"url":"","expiresIn":7200,"id":6506375550,"type":10}]
     * cookie : __remember_me=true; Max-Age=1296000; Expires=Fri, 25 Dec 2020 07:32:35 GMT; Path=/;;NMTID=00OANJZXozayxGpGUvAlhn-6EHf9lAAAAF2S5Dkpg; Max-Age=315360000; Expires=Sun, 8 Dec 2030 07:32:35 GMT; Path=/;;MUSIC_U=fbf5b89fdf32e70f1d4290bd884a2fb3dcc4f1315f3ca117824516614ac4033bd106471d18c1d4a4; Max-Age=1296000; Expires=Fri, 25 Dec 2020 07:32:35 GMT; Path=/;;__csrf=0cb3ab82dd4d88c5d4c664f1b01479c5; Max-Age=1296010; Expires=Fri, 25 Dec 2020 07:32:45 GMT; Path=/;
     */

    private int loginType;
    @ApiModelProperty(value = "请求结果 200请求成功")
    private int code;
    private AccountBean account;
    private String token;
    private ProfileBean profile;
    private String cookie;
    private List<BindingsBean> bindings;
    private String msg;
    private String message;


    @Data
    @EqualsAndHashCode(callSuper = false)
    @Accessors(chain = true)
    public static class AccountBean {
        /**
         * id : 18769859
         * userName : 1_15619608424
         * type : 1
         * status : 0
         * whitelistAuthority : 0
         * createTime : 0
         * salt : [B@1f91e345
         * tokenVersion : 3
         * ban : 0
         * baoyueVersion : 0
         * donateVersion : 0
         * vipType : 0
         * viptypeVersion : 0
         * anonimousUser : false
         */

        private int id;
        private String userName;
        private int type;
        private int status;
        private int whitelistAuthority;
        private int createTime;
        private String salt;
        private int tokenVersion;
        private int ban;
        private int baoyueVersion;
        private int donateVersion;
        private int vipType;
        private int viptypeVersion;
        private boolean anonimousUser;


    }
    @Data
    @EqualsAndHashCode(callSuper = false)
    @Accessors(chain = true)
    public static class ProfileBean {
        /**
         * avatarImgId : 3329321209025958
         * birthday : -2209017600000
         * nickname : 旅途的人生
         * djStatus : 0
         * experts : {}
         * followed : false
         * backgroundUrl : https://p2.music.126.net/CBnGs1GL-_zQIeCdMiod4g==/109951163002633594.jpg
         * detailDescription :
         * mutual : false
         * remarkName : null
         * expertTags : null
         * authStatus : 0
         * description :
         * avatarImgIdStr : 3329321209025958
         * city : 610500
         * backgroundImgIdStr : 109951163002633594
         * backgroundImgId : 109951163002633600
         * avatarUrl : https://p4.music.126.net/gDLPJmke4wS6l42XAhBskQ==/3329321209025958.jpg
         * userId : 18769859
         * userType : 0
         * defaultAvatar : false
         * province : 610000
         * accountStatus : 0
         * vipType : 0
         * gender : 0
         * signature :
         * authority : 0
         * followeds : 5
         * follows : 17
         * eventCount : 0
         * avatarDetail : null
         * playlistCount : 21
         * playlistBeSubscribedCount : 0
         */

        private long avatarImgId;
        private long birthday;
        private String nickname;
        private int djStatus;
        private boolean followed;
        private String backgroundUrl;
        private String detailDescription;
        private boolean mutual;
        private Object remarkName;
        private Object expertTags;
        private int authStatus;
        private String description;
        private String avatarImgIdStr;
        private int city;
        private String backgroundImgIdStr;
        private long backgroundImgId;
        private String avatarUrl;
        private int userId;
        private int userType;
        private boolean defaultAvatar;
        private int province;
        private int accountStatus;
        private int vipType;
        private int gender;
        private String signature;
        private int authority;
        private int followeds;
        private int follows;
        private int eventCount;
        private Object avatarDetail;
        private int playlistCount;
        private int playlistBeSubscribedCount;


    }
    @Data
    @EqualsAndHashCode(callSuper = false)
    @Accessors(chain = true)
    public static class BindingsBean {
        /**
         * bindingTime : 1513513621053
         * refreshTime : 1513513765
         * tokenJsonStr : {"countrycode":"","cellphone":"15619608424","hasPassword":true}
         * expired : false
         * userId : 18769859
         * url :
         * expiresIn : 2147483647
         * id : 6506467840
         * type : 1
         */

        private long bindingTime;
        private int refreshTime;
        private String tokenJsonStr;
        private boolean expired;
        private int userId;
        private String url;
        private int expiresIn;
        private long id;
        private int type;


    }
}
